package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    /**
     * 根据菜品id查询对应套餐id
     * @return
     */
    List<Long> getSetmealIdsByDishIds(List<Long> dishIds);

    void insert(SetmealDish setmealDishe);


    void deleteBySetmealIds(List<Long> ids);
    @Delete("delete from setmeal_dish where id=#{id}")
    void deleteBySetmealId(Long id);

    /**
     * 根据套餐id查询对应的菜品id
     * @param SetmealId
     */
    @Select("select * from setmeal_dish where setmeal_id=#{SetmealId}")
    List<SetmealDish> getBySetmealId(Long SetmealId);
}
